package com.it.menudrawer;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import net.simonvt.menudrawer.MenuDrawer;
import net.simonvt.menudrawer.SlidingDrawer;

public class MainActivity extends AppCompatActivity {

    private SlidingDrawer slidingDrawer;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        slidingDrawer = (SlidingDrawer) findViewById(R.id.slidingDrawer);
        slidingDrawer.setTouchMode(MenuDrawer.TOUCH_MODE_FULLSCREEN);
        slidingDrawer.setDropShadowSize(0);
        slidingDrawer.setDropShadowEnabled(false);
        slidingDrawer.setOnDrawerStateChangeListener(new MenuDrawer.OnDrawerStateChangeListener() {
            @Override
            public void onDrawerStateChange(int oldState, int newState) {
                System.out.println("newState:"+newState);
            }

            @Override
            public void onDrawerSlide(float openRatio, int offsetPixels) {

            }
        });
    }
}
